/**
 * Demonstrates a range of Button options the framework offers out of the box
 */
Ext.define('cloud.view.sysfunction.SysfunctionEdit', {
    extend: 'Ext.form.FormPanel',
    xtype: 'sysfunctionedit',

    requires: ['Ext.form.Panel', 'Ext.form.FieldSet','Ext.field.Toggle', 'Ext.field.Hidden'],
    config: {

        //style:'font-size:14px',
        store: 'AppInfoGetStore',
        title: '显示or编辑',
        items: [
            {
                xtype: 'toolbar',
                docked: 'bottom',
                layout: {
                    type: 'hbox',
                    pack: 'end'
                },
                items: [
                    {
                        id: 'sys_edit',
                        iconMask: true,
                        scope: this,
                        cls:'x-button2',
                        text: '更新',
                        style: 'float:right'
                    }
                ]
            },
            {
                xtype: 'fieldset',
                title: '详情及更新',
                defaults: {
                    labelwidth: '20%',
                    xtype: 'textfield',
                    required: true,
                    clearIcon: true
                },

                items: [
                    {
                        xtype:'selectfield',
                        label:'选择父系统功能',
                        id:'sysfunctionpid',
                        name:'pid',
                        displayField: 'name',
                        valueField: 'id'
                    },
                    {
                        name: 'name',
                        label: '功能名',
                        maxLength: 50,
                        placeHolder: '请输功能名'
                    },
                    {
                        id: 'sys_linkurl',
                        name: 'linkurl',
                        label: '功能连接名',
                        maxLength: 50,
                        placeHolder: '请输入连接名'
                    },
                    {
                        name: 'icon',
                        label: 'icon',
                        maxLength: 50
                    },
                    {
                        name: 'sort',
                        required: false,
                        label: '排序',
                        maxLength: 50
                    },
                    {
                        xtype: 'selectfield',
                        name: 'ftype',
                        label: '功能类型',
                        options: [
                            {
                                text: '系统功能',
                                value: '3'
                            },
                            {
                                text: '应用功能',
                                value: '1'
                            },
                            {
                                text: '普通功能',
                                value: '2'
                            }
                        ]
                    },
                    {
                        xtype: 'togglefield',
                        name: 'status',
                        label: '是否启用',
                        labelWidth: '30%'
                    },
                    {
                        id: 'sys_function_ID',
                        name: 'sys_function_ID',
                        hidden:true
                    }
                ]
            }
        ]
    }
});

